package org.ysu.shoeShopping.dto;

import java.util.List;

/**
 * 订单提交请求DTO - 匹配前端orderForm结构
 */
public class OrderRequest {
    private Integer uid;                 // 用户ID
    private Integer addressId;           // 地址ID
    private Double principal;            // 订单金额
    private Integer points;              // 订单积分
    private List<OrderItem> orderItems;  // 商品信息

    /**
     * 订单商品项
     */
    public static class OrderItem {
        private Integer productId;       // 商品id
        private String size;             // 尺寸
        private Integer quantity;        // 数量

        public Integer getProductId() {
            return productId;
        }

        public void setProductId(Integer productId) {
            this.productId = productId;
        }

        public String getSize() {
            return size;
        }

        public void setSize(String size) {
            this.size = size;
        }

        public Integer getQuantity() {
            return quantity;
        }

        public void setQuantity(Integer quantity) {
            this.quantity = quantity;
        }
    }

    public Integer getUid() {
        return uid;
    }

    public void setUid(Integer uid) {
        this.uid = uid;
    }

    public Integer getAddressId() {
        return addressId;
    }

    public void setAddressId(Integer addressId) {
        this.addressId = addressId;
    }

    public Double getPrincipal() {
        return principal;
    }

    public void setPrincipal(Double principal) {
        this.principal = principal;
    }

    public Integer getPoints() {
        return points;
    }

    public void setPoints(Integer points) {
        this.points = points;
    }

    public List<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }
}